package com.sinosoft.dsp.component.bpm.viewbean.activity.part;

import com.sinosoft.dsp.component.bpm.service.core.BpmSelectItemsService;
import com.sinosoft.dsp.component.bpm.viewbean.activity.BpmAbstractActivityPartEditViewBean;
import com.sinosoft.dsp.component.bpm.viewbean.activity.IBpmActivityPartEditViewBean;
import com.sinosoft.dsp.system.core.exception.SinoException;
import com.sinosoft.dsp.system.to.IGenericTO;

public class BpmActivityTaskStrategyViewBean extends
		BpmAbstractActivityPartEditViewBean implements
		IBpmActivityPartEditViewBean {

	// 分配策略
	public static final String FIELD_STRATEGY_ASSIGN = "assign";

	// 分配处理器
	public static final String FIELD_STRATEGY_ASSIGN_HANDLER = "assignHandler";

	// 完成策略
	public static final String FIELD_STRATEGY_COMPLETE_STRATEGY = "completeStrategy";

	// 完成策略数值
	public static final String FIELD_STRATEGY_COMPLETE_STRATEGY_VALUE = "completeStrategyValue";

	// 可以退回(BOOLEAN)
	public static final String FIELD_STRATEGY_ROLLBACK = "rollback";

	// 退回保存数据(BOOLEAN)
	public static final String FIELD_STRATEGY_ROLLBACK_SAVE = "rollbackSave";

	// 必填退回留言(BOOLEAN)
	public static final String FIELD_STRATEGY_ROLLBACK_MESSAGE = "rollbackMessage";

	// 可以撤回(BOOLEAN)
	public static final String FIELD_STRATEGY_WITHDRAW = "withdraw";

	// 必填撤回留言(BOOLEAN)
	public static final String FIELD_STRATEGY_WITHDRAW_MESSAGE = "withdrawMessage";

	// 超时自动提交(BOOLEAN)
	public static final String FIELD_STRATEGY_OVERTIME_SUBMIT = "overtimeSubmit";

	// 默认提交策略
	public static final String FIELD_STRATEGY_DEFAULT_TRANSITION = "defaultTransition";

	@Override
	public void init(IGenericTO tos) throws SinoException {
		super.init(tos);
		this.addField(FIELD_STRATEGY_ASSIGN,
				BpmSelectItemsService.SELECT_ITEM_ASSIGN_DEFAULT);
		this.addField(FIELD_STRATEGY_COMPLETE_STRATEGY,
				BpmSelectItemsService.SELECT_ITEM_COMPLETE_STRATEGY_DEFAULT);
		this.addField(FIELD_STRATEGY_ROLLBACK, false);
		this.addField(FIELD_STRATEGY_ROLLBACK_SAVE, false);
		this.addField(FIELD_STRATEGY_ROLLBACK_MESSAGE, false);
		this.addField(FIELD_STRATEGY_WITHDRAW, false);
		this.addField(FIELD_STRATEGY_WITHDRAW_MESSAGE, false);
		this.addField(FIELD_STRATEGY_OVERTIME_SUBMIT, false);
	}
}
